module.exports = (app) => {
  const { INTEGER, DATE, BOOLEAN } = app.Sequelize
  const WorksLike = app.model.define('works_like', {
    id: {
      type: INTEGER(20).UNSIGNED,
      primaryKey: true,
      autoIncrement: true,
      comment: '主键id'
    },
    works_id: {
      type: INTEGER(20).UNSIGNED,
      allowNull: false,
      comment: '留言的标签id'
    },
    user_id: {
      type: INTEGER(20).UNSIGNED,
      allowNull: false,
      comment: '留言的用户id'
    },
    status: {
      type: BOOLEAN,
      allowNull: false,
      defaultValue: 1,
      comment: '状态 0:禁用 1:正常'
    },
    created_at: DATE,
    updated_at: DATE
  })
  return WorksLike
}
